package cn.com.api.mapper.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import com.sdicons.json.validator.impl.predicates.True;

import cn.com.api.entity.ApiU_service;
import cn.com.api.entity.ApiU_zan;

//DAO
public interface U_zanMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_ZAN  WHERE ID = #{id}")
	public ApiU_zan findU_zanById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_zan")
	public List<ApiU_zan> findU_zans();

	// 添加
	@Insert("INSERT INTO U_ZAN (CONN_ID, USER_ID, ZAN_TYPE, ADD_TIME, IS_CANCEL) VALUES (#{conn_id}, #{user_id}, #{zan_type}, #{add_time}, #{is_cancel})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_zan(ApiU_zan u_zan);

	// 修改
	@Update("UPDATE U_ZAN SET CONN_ID = #{conn_id}, USER_ID = #{user_id}, ZAN_TYPE = #{zan_type}, ADD_TIME = #{add_time}, IS_CANCEL = #{is_cancel} WHERE ID = #{id}")
	public int updateU_zan(ApiU_zan u_zan);

	// 删除
	@Delete("DELETE FROM U_ZAN  WHERE ID = #{id}")
	public int deleteU_zan(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
